<?php

Yii::import('application.models._base.BaseClosing');

class Closing extends BaseClosing
{
	public static function model($className=__CLASS__) {
		return parent::model($className);
	}
	public function beforeValidate()
	{
		if($this->tdate == null){
			$this->tdate = new CDbExpression('NOW()');
		}
		if($this->id_user == null){
			$this->id_user = Yii::app()->user->getId();
		}

		return parent::beforeValidate();
	}
}